home *** CD-ROM | disk | FTP | other *** search
/ Suzy B Software 2 / Suzy B Software CD-ROM 2 (1994).iso / extras / programm / gemfsc20 / gemfsc20.lzh / INCLUDE / FSMBIND.H < prev    next >
C/C++ Source or Header  |  1993-03-18  |  4KB  |  140 lines

  1. /* FSM gdos bindings */
  2.  
  3. /* ---------------------------------------------------------------------------
  4.  * Retrieve placement information for FSM generated characters
  5.  * Information is placed in infoarray of 52 ints.
  6.  * Borrow a soothsayer from DRI or Atari to find its meaning.
  7.  *
  8.  * This is a temporary bindings since one genius decided
  9.  * that some entries in infoarray will represent real numbers.
  10.  * You may fully expect that that this representation of reals is
  11.  * absolutely different from what your compiler is using.
  12.  * Count your lucky stars if at least sizeof(double) == 2 * sizeof(int).
  13.  * Or maybe sizeof(double) is supposed to be sizeof(float)?
  14.  */
  15. __EXTERN void v_getbitmap_info __PROTO((int handle, int ch, int infoarray[]));
  16.  
  17. /*
  18.  * Inquire text extent, accounting for FSM text placement
  19.  */
  20. __EXTERN void vqt_f_extent __PROTO((int handle, const char *str, int extent[]));
  21.  
  22. /*
  23.  * Draw FSM text (accounts for fractional advances in rotated text)
  24.  */
  25. __EXTERN void v_ftext __PROTO((int handle, int x, int y, const char *str));
  26.  
  27. /*
  28.  * Release memory associated with outline component generated by v_getoutline()
  29.  */
  30. __EXTERN void v_killoutline __PROTO((int handle, void *component));
  31.  
  32. /*
  33.  * Generate an outline for character ch, and return the address of the outline.
  34.  */
  35. __EXTERN void v_getoutline __PROTO((int handle, int ch, void **component));
  36.  
  37. /*
  38.  * Set scratch buffer allocation mode.
  39.  * mode=0: (default) account for FSM fonts when allocating scratch buffers
  40.  * mode=1: account only for BM fonts
  41.  * mode=2: allocate no scratch buffer
  42.  */
  43. __EXTERN void vst_scratch __PROTO((int handle, int mode));
  44.  
  45. /*
  46.  * Set FSM error mode.
  47.  * mode=1: (default) errors go to screen.
  48.  * mode=0: errors reported in error variable `errorvar'.
  49.  */
  50. __EXTERN void vst_error __PROTO((int handle, int mode, int *errorvar));
  51.  
  52. /*
  53.  * v_gtext with optional shadow attribute
  54.  */
  55. __EXTERN void    v_shtext __PROTO(( int wsid, int x, int y, const char *text,
  56.                   int color, int xshadow, int yshadow ));
  57.  
  58. /*
  59.  * Set character cell height by arbitrary points.
  60.  */
  61. __EXTERN int    vst_arbpt __PROTO((  int handle, int point, int *wchar,
  62.                    int *hchar, int *wcell, int *hcell ));
  63.  
  64. /*
  65.  * Inquire FSM text advance placement vector.
  66.  */
  67. __EXTERN void    vqt_advance __PROTO(( int handle, int ch, int *xadv,
  68.                      int *yadv, int *xrem, int *yrem));
  69.  
  70. /*
  71.  * Inquire device status information.
  72.  */
  73. __EXTERN void    vqt_devinfo __PROTO(( int handle, int device, int *isdev,
  74.                      char *drivername ));
  75.  
  76. /*
  77.  * Save FSM cache to disk.
  78.  */
  79. __EXTERN int    v_savecache __PROTO(( int handle, char *filename ));
  80.  
  81. /*
  82.  * Load/merge FSM cache from disk.
  83.  */
  84. __EXTERN int    v_loadcache __PROTO(( int handle, char *filename, int mode ));
  85.  
  86. /*
  87.  * Flush FSM cache.
  88.  */
  89. __EXTERN int    v_flushcache __PROTO(( int handle ));
  90.  
  91. /*
  92.  * Set character cell width by arbitrary points.
  93.  */
  94. __EXTERN int    vst_setsize __PROTO(( int handle, int point, int *wchar,
  95.                      int *hchar, int *wcell, int *hcell ));
  96.  
  97. /*
  98.  * Set FSM skew.
  99.  */
  100. __EXTERN int    vst_skew __PROTO(( int handle, int skew ));
  101.  
  102. /*
  103.  * Get FSM GASCII tables.
  104.  */
  105. __EXTERN void    vqt_get_tables __PROTO(( int handle, void **gascii,
  106.                     void **style ));
  107.  
  108. /*
  109.  * Get FSM cashe size
  110.  */
  111. __EXTERN void    vqt_cachesize __PROTO(( int handle, int which_cache,
  112.                        size_t *size ));
  113.  
  114. /*
  115.  * bezier curves stuff
  116.  */
  117. __EXTERN void v_set_app_buff __PROTO((void **buf_p, int size));
  118.  
  119. __EXTERN int v_bez __PROTO((int handle, int count,
  120.                      int *xyarr, char *bezarr,
  121.                  int extent[4], int *npts, int *nmvs));
  122. __EXTERN int v_bez_fill __PROTO((int handle, int count,
  123.                  int *xyarr, char *bezarr,
  124.                  int extent[4], int *npts, int *nmvs));
  125. __EXTERN int v_bez_qual __PROTO((int handle, int percent, int *actual));
  126.  
  127. #ifdef ALTERNATE
  128.  
  129. /* Use these #defines if you _really_ want to stick to DRI conventions */
  130.  
  131. __EXTERN int v_bez_con __PROTO((int handle, int onoff));
  132. #define v_bez_on(x) (int)v_bez_con((x), 1)
  133. #define v_bez_off(x)    (void)v_bez_con((x), 0)
  134.  
  135. #else
  136. __EXTERN int v_bez_on __PROTO((int handle));
  137. __EXTERN void v_bez_off __PROTO((int handle));
  138. #endif /* ALTERNATE */
  139.  
  140.